package com.pm25.request;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;

import com.pm25.exception.ValidateException;
import com.pm25.response.AqisByStationResponse;

public class AqisByStationRequest implements Request<AqisByStationResponse> {
	
	private String stationCode;

	public void valid() throws ValidateException {
		if (StringUtils.isBlank(stationCode)) {
			throw new ValidateException("监测点代码不能为空");
		}
	}

	public Map<String, String> getParamterMaps() {
		Map<String, String> param = new HashMap<>();
		param.put("station_code", stationCode);
		return param;
	}

	public String getUri() {
		return "/api/querys/aqis_by_station.json";
	}

	public Class<AqisByStationResponse> getResponseClass() {
		return AqisByStationResponse.class;
	}

}
